'use strict';

const Sequelize = require('sequelize');
const sequelize = require('../util/sequelize');

var Donate = sequelize.define('donate', {
    prepayId: {
        type: Sequelize.STRING
    },
    userId: {
        type: Sequelize.STRING
    },
    toUserId: {
        type: Sequelize.STRING
    },
    amount: {
        type: Sequelize.DOUBLE,
        defaultValue: 0.0,
    },
    state: {
        type: Sequelize.INTEGER,
        defaultValue: 0
    }
});

Donate.sync({
    force: false
});

module.exports = Donate;